@extends('frontend/layouts/default')

@section('content')

<h1>All Code</h1>

<p>{{ link_to_route('nd.master.code.create', 'Add new Code', null, array('class' => 'btn btn-info')) }}</p>

@if ($codes->count())
<table class="table table-striped table-bordered">
    <thead>
        <tr>
<th>Domainid</th>
<th>Codetype</th>
<th>Code</th>
<th>Name</th>
<th>Description</th>
<th>Sortno</th>
<th> Action  </th>
        </tr>
    </thead>
    <tbody>
        @foreach ($codes as $code)
        <tr>
<td>{{ $code->domainid }}</td>
<td>{{ $code->codetype }}</td>
<td>{{ $code->code }}</td>
<td>{{ $code->name }}</td>
<td>{{ $code->description }}</td>
<td>{{ $code->sortno }}</td>
<td>  
{{ Form::open(array('method' => 'DELETE', 'route' => array('nd.master.code.destroy', $code->getJointPk()))) }} 
{{ link_to_route('nd.master.code.edit', 'Edit', $code->getJointPk(), array('class' => 'btn btn-info')) }} &nbsp;&nbsp;
{{ Form::submit('Delete', array('class' => 'btn btn-danger')) }} 
{{ Form::close() }} 
</td>
        </tr>
        @endforeach
    </tbody>
</table>
@else
    There are no codes
@endif

@stop